﻿@inherits ComponentBase

<PageTitle>@Title</PageTitle>

<MudStack Class="flex my-8"
          Spacing="6">
    <MudStack Spacing="0"
              Row="true"
              Class="flex">
        <MudText Class="text-2xl font-medium">@Title</MudText>
        <MudSpacer/>
        @if (ShowBreadCrumbs)
        {
            if (Breadcrumbs != null)
            {
                <MudBreadcrumbs MaxItems="7"
                                Items="@Breadcrumbs.ToList()"
                                Class="my-auto font-normal p-0 pb-3 opacity-50"/>
            }
        }
    </MudStack>
    @ChildContent
</MudStack>


@code {

    [Parameter] public string Title { get; set; }
    [Parameter] public bool ShowBreadCrumbs { get; set; } = true;
    [Parameter] public BreadcrumbItem[]? Breadcrumbs { get; set; }
    [Parameter] public RenderFragment ChildContent { get; set; }
}